home *** CD-ROM | disk | FTP | other *** search
- #define DISABLE_LOCAL_CALLTRACE 1 // Set to 1 to disable Call Traces for this file.
- #define DISABLE_LOCAL_DEBUG 0 // Set to 1 to disable all debugging for this file.
- #include "DebugUtils.h"
-
- #include "GWorld.h"
-
-
-
-
-
- GWorldPtr CreateGWorld(Rect *bounds)
- {
- GWorldPtr world = NULL;
- OSStatus err;
-
-
- err = NewGWorld(&world,0,bounds,NULL,NULL,keepLocal | pixelsLocked | useTempMem);
- dAssert((err == noErr) && (world != NULL));
- if ((err != noErr) || (world == NULL))
- return NULL;
-
- CGrafPtr port;
- GDHandle gdh;
-
- GetGWorld(&port,&gdh);
- SetGWorld(world,NULL);
-
- EraseRect(bounds);
-
- SetGWorld(port,gdh);
-
- return world;
- }
-